/**
 * 

 */
package edu.vt.ece.rt.quorum.util;

import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;

import org.jgroups.Address;

/**
 * A point to synchronise all the exit in base cluster
 * @author Sudhanshu
 *
 */
public class WaitObject {
	public AtomicInteger counter;		//Used by root to count the number of response
	public AtomicBoolean rootDone;
	public Address rootAdr;			//Updated by incoming message to send back reply.
	
	public WaitObject(int c){
		counter = new AtomicInteger(c);
		rootDone = new AtomicBoolean(false);
	}
	
	public void updateCounter(int i){
		counter.set(i);
	}
}
